package com.xxgc.ssm.controller;

import com.xxgc.ssm.po.Users;
import com.xxgc.ssm.po.info.Info;
import com.xxgc.ssm.service.IUserLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
public class UserLogin {
    //搭建一个通道
    @Autowired
    private IUserLogin uls;

    @RequestMapping("/login")
    @ResponseBody
    public Info test(Users users, HttpSession session){
        return uls.selectUserByNameAndPass(users,session);
    }
}
